package com.example.commons.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo extends BaseEntity implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(type= IdType.AUTO)
    private Long id;
    /**
     * 用户名
     */
    private String userName;
    /**
     * 用户昵称
     */
    private String userNickname;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 居住地址
     */
    private String address;
    /**
     * 密码
     */
    private String password;
    /**
     * 头像
     */
    private String photo;
//    /**
//     * 角色
//     */
//    @TableField(exist = false)
//    private List<Long> roles;
    /**
     * 角色Id
     */
    @TableField(exist = false)
    private Long roleId;
    /**
     * 按钮权限
     */
    @TableField(exist = false)
    private List<String> authBtnList;
    /**
     * 用户状态
     */
    private Boolean status;
    /**
     * 用户描述
     */
    @TableField(exist = false)
    private String describe;
}
